package com.orange.delivery.presentation;

import org.apache.wicket.spring.injection.annot.SpringComponentInjector;
import org.apache.wicket.spring.test.ApplicationContextMock;

/**
 * 
 * Mock application is using a mock spring context
 * 
 */
public class MockWicketApplication extends WicketApplication {

	private ApplicationContextMock context;

	public MockWicketApplication(ApplicationContextMock context) {
		this.context = context;
	}

	@Override
	protected void defineSpringInjector() {
		getComponentInstantiationListeners().add(new SpringComponentInjector(this, context, true));

	}

	public ApplicationContextMock getContext() {
		return context;
	}
}